<?php 

namespace pmvc\mvc\security;

class MD5PasswordEncoder
	implements PasswordEncoder {

	private $salt;

	function encode($password) {
		if ($this->salt!=NULL) {
			$password = $this->salt.$password;
		}
		return md5($password);
	}

	public function setSalt($salt) {
		$this->salt = $salt;
	}

}

?>